get path and name of file for open()

30

import os
f = open('file.txt')
file_path = os.path.realpath(f.name)

Comments

Submit
0 Comments